import request from '@/utils/request'
import cache from "@/plugins/cache";

// 查询全局设备类型模板列表
export function listDrtypemodeglobal(query) {
  return request({
    url: '/system/drtypemodeglobal/list',
    method: 'get',
    params: query
  })
}

// 查询全局设备类型模板详细
export function getDrtypemodeglobal(typemodeid) {
  return request({
    url: '/system/drtypemodeglobal/' + typemodeid,
    method: 'get'
  })
}

// 新增全局设备类型模板
export function addDrtypemodeglobal(data) {
  return request({
    url: '/system/drtypemodeglobal',
    method: 'post',
    data: data
  })
}

// 修改全局设备类型模板
export function updateDrtypemodeglobal(data) {
  return request({
    url: '/system/drtypemodeglobal',
    method: 'put',
    data: data
  })
}

// 删除全局设备类型模板
export function delDrtypemodeglobal(typemodeid) {
  return request({
    url: '/system/drtypemodeglobal/' + typemodeid,
    method: 'delete'
  })
}

//变量分组
export function groupSelect() {
  return request({
    url: '/system/drtypemodeglobal/listAllGlobalGroup',
    method: 'get'
  })
}

// 查询设备类型下拉树结构
export function drTypeSelect() {
  return request({
    url: '/system/drtypemodeglobal/listAllGlobalDrTypeInfo',
    method: 'get'
  })
}

// 查询设备类型下拉树结构
export function deviceTypeTreeSelect() {
  return request({
    url: '/system/drtypemodeglobal/drTypeTree',
    method: 'get'
  })
}

// 获取字典选择框列表
export function getSubOptionSelect() {
  return request({
    url: '/system/drtypemodeglobal/globalSubAllList',
    method: 'get'
  })
}
